﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Documents;

namespace SmartPaginator.Extensions
{
    public static class TextElementExtensions
    {
        public static double GetLineHeight(this TextElement element)
        {
            return element.FontFamily.LineSpacing * element.FontSize;
        }

        public static double GetLineHeight(this FlowDocument document)
        {
            return document.FontFamily.LineSpacing * document.FontSize;
        }
    }
}
